Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

4.3 Embedded System Hardware and Operating System Interfaces

4.3.1 i.MX6 Solo/DualLite Processor

The core architecture of the i.MX6 Solo/DualLite features a single- or dual-core ARMv7 processor context. Around this processing core, NXP has integrated a vast matrix of multimedia and infrastructure modules, including hardware cryptographic acceleration engines, Vivante 2D and 3D GPUs, a Video Processing Unit (VPU), dual USB controllers, MMC/eMMC host interfaces, a multi-channel DDR memory controller, an LVDS display interface bridge, an HDMI transmitter, MIPI DSI/CSI interfaces, S/PDIF and EASI digital audio engines, an Enhanced External Interface Module (EIM) and General Purpose Media Interface (GPMI) supporting NOR and NAND flash variants, an enterprise Gigabit Ethernet controller, an Electronic Paper Display Controller (EPDC), a FlexCAN controller, and an ARM Generic Interrupt Controller (GIC), alongside generic I2C and SPI interfaces. The processor natively supports an expansive taxonomy of boot peripherals—including NOR flash, NAND flash, OneNAND, SD/MMC, eMMC, serial (I2C/SPI) NOR flash/EEPROM, and USB paths—and provides high-assurance hardware-enforced image authentication and decryption, resulting in a highly capable multimedia applications processor.

The primary bootloader code is embedded directly within the processor's on-chip boot ROM. This ROM bootloader features the following design attributes:

  • Granular support for a diverse taxonomy of storage boot devices.

  • Support for serial image downloading and bare-metal recovery via the USB OTG interface.

  • The capacity to parse Device Configuration Data (DCD) tables structured within the boot media to provision internal registers and memory sub-blocks.

  • Support for the execution of user-supplied initialization plugins stored on the boot medium.

  • High-Assurance Boot (HAB) digital signature validation and symmetric/asymmetric image decryption algorithms.

  • System wake-up routines from ultra-low-power suspend states.

  • Inter-Processor Interrupt (IPI) multi-core orchestration to wake secondary execution cores.

The ROM bootloader interrogates internal boot mode configuration registers and the hardware eFUSE matrix to isolate the designated primary boot device. During the prototyping and validation phases of a project, engineers can route specific GPIO lines to override these eFUSE definitions, streamlining low-level board development and hardware debugging.

Leveraging these native ROM routines, developers can initialize unprovisioned storage media; for instance, a raw firmware image can be injected into physical RAM via a host USB connection and subsequently written directly to an unformatted on-board storage chip.

The underlying ROM supports exactly three distinct boot pathways: eFUSE boot, serial downloader mode, and internal boot. The eFUSE boot path relies exclusively on the blown states of the on-chip fuse array to map the hardware initialization envelope. The serial downloader mode converts the USB OTG interface into a client endpoint to pull and run recovery payloads. The critical functional distinction between the eFUSE boot path and the internal boot path is that the internal boot mode evaluates physical GPIO pins on startup, allowing developers to manually override fuse settings. If an unrecoverable fault or timeout occurs during an eFUSE or internal boot sequence, the ROM state machine defaults to serial downloader mode.

During the hardware reset phase, the processor latches the electrical states of the dedicated boot configuration pins into internal registers. Upon release of the reset line, the execution pointer jumps directly to the on-chip ROM block. After performing essential baseline processor provisioning, the ROM code evaluates the latched status of the eFUSE, GPIO, and boot mode fields to determine the target storage interface. It then fetches a fixed allocation of blocks from a hardcoded offset on the boot media. This data chunk encapsulates the Image Vector Table (IVT), which acts as the definitive binary structural guide used to locate the Device Configuration Data (DCD) array, boot data parameters, and the primary application entry point addresses. The on-chip bootloader processes these tables to tune peripheral controllers and initialize the DDR controller, copies the primary U-BOOT binary from storage into physical RAM, and finally jumps to U-BOOT to drive the operating system initialization sequence forward.

4.3.2 On-Chip Bootloader

Upon system power-on reset, the power management and reset circuit forces the CPU into a deterministic baseline state, driving the primary program counter (PC) to align with a fixed physical address vector. This vector addresses the absolute starting instruction of the on-chip ROM, which typically contains a branch instruction leading into the primary ROM bootloader entry point. The fundamental objective of this low-level code block is to execute minimal, essential system initializations—such as configuring basic clock trees and initializing the external DDR memory interface—and transition the CPU core into its optimal execution mode. Once memory is available, the routine loads the initial boot data blocks and the primary U-BOOT stage binary from the initial boot sectors of the target storage media into RAM, then hands over execution to U-BOOT. The following analysis profiles the operational workflow of this on-chip bootloader using the NXP i.MX6 DualLite/Solo multimedia applications processor as a reference model.

Following a power-on reset (POR) cycle, the i.MX6 DualLite/Solo hardware samples the electrical levels of the BOOT_MODE0 and BOOT_MODE1 pins, latching these values directly into bits [1:0] of the internal BOOT_MODE register. The configured bit-pattern of BOOT_MODE[1:0], paired with the blown configurations of specific eFUSE registers and the real-time logic states of a defined subset of GPIO selection lines, strictly dictates the platform's boot pathway and execution topology. The integrated ROM layout provides native driver support to initialize and fetch payloads across SD/MMC cards, parallel/serial NOR flash, raw NAND flash, OneNAND arrays, high-speed SPI/I2C EEPROMs, and memory chips. The internal i.MX6 DualLite/Solo boot ROM provides the following technical capabilities:

  • Streamlined serial payload down-streaming and flashing via the integrated USB OTG controller interface.

  • The capacity to parse structural Device Configuration Data (DCD) matrices and execute short, pre-boot initialization software snippets (plugins).

  • Cryptographically sound digital signature verification (High-Assurance Boot) and encrypted secure boot mechanics.

  • System state restoration and execution tracking when waking up from low-power power-saving modes.

  • Multi-core initialization routines to bring up the secondary CPU core.

The on-chip ROM framework also supports directly downloading external payloads into internal RAM and executing them in place.

The capability to parse local configuration parameters (DCD) and execute standalone plugin code blocks represents two of the most critical design attributes of the on-chip bootloader layer. By leveraging these mechanisms, system engineers can achieve highly optimized hardware timing register configurations and bring up external DDR memory blocks before launching the primary U-BOOT binary, ensuring U-BOOT has a stable, high-capacity memory footprint available for its boot routines.

The i.MX6 Solo/DualLite platforms support exactly three operational boot configurations:

  • eFUSE Boot Mode: Hardware configuration parameters and interface choices are governed entirely by the internal non-volatile fuse array.

  • Serial Downloader Mode: Forces the chip to pause routine boot checks and wait for an incoming software payload via the USB OTG port.

  • Internal Boot Mode: Peripheral parameters and interface selections are driven by the logical values sampled from external physical GPIO pins.

The definitive difference between the eFUSE boot mode and the internal boot mode is that the eFUSE mode completely locks down the boot flow, preventing developers from overriding the hardware parameter matrices via external strap pins; conversely, the internal boot configuration evaluates real-time GPIO logic states to dynamically adjust hardware behaviors.

The serial downloader configuration allows developers to connect a host machine to the board's USB OTG port to inject binary payloads directly into volatile memory or program non-volatile flash storage blocks. The foundational operational flow chart governing the i.MX6 Solo and i.MX6 DualLite on-chip boot ROM sequence is mapped out in the schematic diagram below:

Figure 4-3 On-Chip Bootloader Flowchart

If an unrecoverable data corruption fault, communication timeout, or execution error occurs during the execution of either the internal boot or eFUSE boot pathways, the on-chip bootloader state machine automatically executes a fallback branch, shifting the processor into serial USB downloader mode to ensure the system can be successfully recovered and booted via the serial communication interface.

4.3.3 Image Bootloader Structure

The so-called image program refers to the executable binary software stored on the boot device. The storage layout of the image program must conform strictly to a specific format. Otherwise, the on-chip boot ROM and U-BOOT cannot determine the physical locations of the various components on the storage media, nor can they resolve the destination execution addresses in memory or locate the program's primary entry point. For the i.MX6 Solo/DualLite processors, a valid image program is composed of the following four sequential blocks:

  • Image Vector Table (IVT)

  • Device Configuration Data (DCD)

  • Boot Data

  • Application Code and Data

Among these components, the Image Vector Table is stored at a fixed, deterministic offset on the boot device. It consists of a precise array of pointer vectors that the on-chip boot ROM utilizes to locate the remaining sections of the program across the storage media blocks. The DCD block encapsulates a specialized group of registers and value pairings readable by the on-chip ROM to tune internal silicon parameters and configure peripheral controllers. The Boot Data table stores the absolute physical location of the image, its exact linear size, and explicit configuration flags indicating whether a pre-boot initialization software plugin is active. Together, these three introductory blocks are collectively defined as the Initial Program Loader (IPL) or initial import region. Upon completing its low-level internal resets, the on-chip boot ROM must copy this initial import block into internal RAM before processing any other routines. Finally, the application code and data section contains the actual compiled U-BOOT instructions and structural environment data tables.

4.3.4 Image Vector Table (IVT)

After performing the necessary hardware initialization and identifying the primary boot medium, the on-chip ROM bootloader first copies the data within the initial boot region into the on-chip RAM and subsequently parses the Image Vector Table (IVT). Based on the parsing results, it relocates the initial boot region data from the on-chip RAM to the target destination address and loads the remainder of the image program into the target address space. For the i.MX6 family of processors, the explicit storage offsets of the IVT across different boot media are defined as follows:

Table 4-1 Storage Offsets of the IVT on Different Media

Boot MediumAbsolute Storage Offset/Address
NOR Flash0x0000_1000 (4 KB)
NAND Flash0x0000_0400 (1 KB)
SD / eMMC / MMC0x0000_0400 (1 KB)
SPI / I2C EEPROM0x0000_0400 (1 KB)

The IVT must be stored at a fixed, deterministic offset on the boot device; this represents the sole structural constraint enforced by the on-chip boot ROM.

The IVT consists of eight distinct 4-byte fields: the header, the entry pointer, reserved region 1, the DCD pointer, the boot data pointer, the self pointer, the Command Sequence File (CSF) pointer, and reserved region 2 (see the diagram below).

Table 4-2 IVT Format

Word OffsetField NameDescription
0x00HeaderDefines tag, length, and version of the IVT.
0x04Entry PointerAbsolute address of the application entry point.
0x08Reserved 1Reserved for future architectural expansion.
0x0CDCD PointerAbsolute memory pointer targeting the DCD block.
0x10Boot Data PointerAbsolute memory pointer targeting the Boot Data block.
0x14Self PointerAbsolute memory pointer targeting the IVT itself.
0x18CSF PointerAbsolute pointer targeting the Command
0x1CReserved 2Reserved for future architectural expansion.

Each component occupies exactly 4 bytes of memory. The structures and specific use cases of these fields are detailed below.

The Header resides at the absolute beginning of the IVT, describing the length and version specification of the structure. Its format is defined as follows:

Table 4-3 Header Format

FieldWidthFixed Value / Encoding Rules
Tag1 Byte0xD1 (Identifies the block as a valid IVT structure)
Length2 BytesBig-Endian integer encoding the total width of the IVT
Version1 Byte0x40 series (e.g., 0x41, 0x42, 0x43)

Within this header block, the Tag field holds a constant value of 0xD1, indicating that the data structure is an IVT. The Length field consumes 2 bytes, encoded in big-endian format, representing the absolute length of the IVT structure itself including the header word. The Version field spans 1 byte, carrying values such as 0x41, 0x42, or 0x43; this parameter explicitly dictates the program entry type, mapping either to the primary application start address or directly to a hardware reset vector.

The Entry field specifies the execution entry point of the image program, corresponding to the initial address of the application or the absolute address of the reset vector.

The DCD Pointer targets the Device Configuration Data array, spanning a length of 4 bytes. The hardware configuration matrices contained within this pointer block are parsed to initialize essential on-chip peripherals, such as the MMDC memory controller and external DDR chips.

The Boot Data Pointer holds the absolute memory address of the standalone Boot Data structure after the image has been loaded into memory. The structural layout of the Boot Data block is defined as follows:

Table 4-4 Boot Data Structure

Field NameWidthArchitectural Meaning
Start Address4 BytesAbsolute destination memory address of the image
Image Length4 BytesTotal linear size of the image program in bytes
Plugin Flag4 BytesConfiguration indicator for pre-boot initialization plugins

In the structure mapped out above, the starting address defines the absolute destination target in physical RAM where the image payload is unpacked and copied, while the length field dictates the total volume of the image in bytes. The plugin slot specifies configurations for custom hardware initialization plugins; when the processor relies on baseline DCD tables instead of an active plugin to configure the SoC, this area is left empty.

The Self Pointer registers the absolute memory address hosting the IVT block itself, utilized dynamically by the on-chip ROM bootloader routines during validation steps.

The CSF Pointer points to the specific memory coordinates hosting the Command Sequence File (CSF) binary stream utilized during high-assurance encrypted secure boot operations.

The physical structural relationship mapping the U-BOOT bootloader's layout on the storage medium to its final expanded layout after being imported into physical RAM is illustrated in the diagram below:

Figure 4-4 U-BOOT Image Bootloader Structure

i.MX6 DualLite/Solo Device Configuration Data (DCD)

Typically, after power-on, the default values of a computer's internal registers are not optimized for system performance, and certain peripherals cannot be used until they are explicitly configured. This requires developers to configure specific registers based on actual hardware conditions to meet system requirements. For example, the i.MX family of applications processors provides an EIM interface, but its default configurations are tailored for generic NOR flash; while NOR flash can be accessed immediately upon boot, the transfer speed is low. Furthermore, this family of chips provides a multi-mode memory controller to drive external RAM, but users must configure an array of register fields before the chosen DDR memory can be accessed. The on-chip boot ROM of the i.MX6 chip provides a built-in function to parse Device Configuration Data (DCD) directly from the boot device. As long as the developer provides the correct data structures at the designated offsets within the external boot image according to the specified formatting rules, the on-chip ROM can execute baseline hardware provisioning automatically.

The DCD structure encapsulates these device configuration parameters, and the on-chip ROM utilizes the pointer vectors resident inside the Image Vector Table (IVT) to resolve the physical location of the DCD payload on the storage medium. The binary storage layout of the DCD data is defined as follows:

Table 4-5 Storage Format of DCD Data

Byte OffsetField NameDescription
0x00DCD HeaderStandard 4-byte descriptor header block.
0x04Commands ArrayA contiguous sequence of configuration commands.

The DCD structure header occupies exactly 4 bytes of memory, organized according to the following layout:

Table 4-6 DCD Header Structure

FieldWidthFixed Value / Encoding Rules
Tag1 Byte0xD2 (Identifies the block as a valid DCD structure)
Length2 BytesBig-Endian integer encoding the total length of the DCD array including this header
Version1 Byte0x41

Within this header block, the Tag field holds a constant byte value of 0xD2, identifying the data structure as a DCD block. The Length field consumes 2 bytes, encoded in big-endian format, representing the absolute length of the DCD payload including the header itself. The Version field spans 1 byte and is fixed to 0x41.

The CMD (Commands) section contains the actual configuration instructions executed by the ROM engine. The interpreter supports exactly 4 distinct command variants: the Write Command, the Check Data Command, the No-Operation (NOP) Command, and the Unlock Command.

The layout syntax for the Write Command is defined as follows:

Table 4-7 Write Command Format

Word OffsetField NameDescription
0x00Command HeaderTag (0xCC), Length (2 Bytes, Big-Endian), and Parameter (1 Byte).
0x04AddressTarget physical or register address for the write operation.
0x08Value / MaskPayload data to be written or bit-mask to be applied.

In this layout, the Address parameter specifies the target register or memory address for the write operation, while the Value/Mask parameter provides the raw payload data to be written or the bitmask to be applied. The command header consists of three segments: the Tag spans 1 byte and holds a constant value of 0xCC to signify a Write command; the Length spans 2 bytes, encoded in big-endian format, defining the total byte width of the Write command sequence including the header; the Parameter field occupies 1 byte, structured as follows:

Table 4-8 Parameter Format

Bit FieldsDescription / Sub-field Encoding
[2:0]Bytes: Width of the target register access; can be set to
[4:3]Flags: Operational mode control fields (Bit 3 = Masked Write, Bit 4 = Set/Clear).

The operational modes defined by these flag bits are evaluated according to the table below:

Table 4-9 Write Command Operational Flags

Binary Bit PatternOperation TypeFunctional Specification
00Clear}Clear bits specified by the value payload.
01WriteDirect write operation (absolute value assignment).
10Clear/ResetExecute a bitwise clear operation using the mask.
11SetExecute a bitwise set operation using the mask.

The Check Data Command performs conditional polling over a target register address space. Its layout configuration is structured as follows:

Table 4-10 Check Data Command Format

Word OffsetField NameDescription
0x00Command HeaderTag (0xCF), Length (2 Bytes, Big-Endian), Parameter (1 Byte).
0x04AddressTarget memory or register address to be polled.
0x08MaskBitmask utilized to filter out unrelated data bits.
0x0CCountMaximum polling loop iteration threshold.

The Address field defines the register target to sample, the Mask field acts as a filter to mask out unrelated bits, and the Count word specifies the loop iteration limit. The ROM engine loops and samples the target address continuously until the specified bitwise conditional checks match the mask constraints or the iteration counter reaches the threshold defined by Count. If Count is initialized to 0, the command effectively functions as a no-operation statement.

The command header for this check utility contains three distinct fields. The Tag is fixed to a constant byte value of 0xCF, identifying the structure as a Check Data block. The Length field consumes 2 bytes, encoded in big-endian format, indicating the total length of the check sequence including its header. The Parameter field occupies 1 byte, formatted as follows:

Table 4-11 Check Data Parameter Header

Bit FieldsDescription / Encoding Specification
[2:0]Bytes: Width of the target access check window (1, 2, or 4 bytes).
[4:3]Flags: Operational evaluation logic selectors (Bit 3 = Masked, Bit 4 = Set).

The exact polling logic governed by these parameter flags is detailed below:

Table 4-12 Data Test Operations

Binary Bit PatternCondition RulesExecution Behavior
00Until All ZeroPoll continuously until all unmasked bits evaluate to zero.
01Until ClearPoll continuously until specified unmasked bits are cleared.
10Until All OnePoll continuously until all unmasked bits evaluate to one.
11Until MatchingPoll continuously until unmasked bits exactly match the target pattern.

The NOP Command occupies exactly 4 bytes of memory, matching the format below:

Table 4-13 NOP Command Format

Byte OffsetField NameFixed Value / Encoding Rules
0x00Tag0xC0 (Identifies a No-Operation token)
0x01LengthFixed to a value of 4 bytes (encoded across 2 bytes: 0x00 0x04).
0x03UndefinedReserved / Undefined trailing byte (can be safely ignored).

The Tag field spans 1 byte and holds the constant value 0xC0. The Length field spans 2 bytes and is fixed to 4. The final byte carries no definition and is ignored by the parsing engine.

The Unlock Command is implemented to prevent the internal secure boot sub-routines from locking out specific hardware engines upon exiting the ROM execution phase. Its structure is configured as follows:

Table 4-14 Unlock Command Format

Field SegmentWidthFunctional Specification
Tag1 Byte0xB2 (Identifies an Unlock token)
Engine ID1 ByteEng vector specifying the hardware cryptographic engine to remain active.
Unlock Value2 BytesValue payload specifying the configuration word needed

The Tag field occupies 1 byte, holding a constant value of 0xB2. The Eng sub-field defines the hardware engine component that must remain active and accessible after the ROM completes execution, while the trailing Value payload provides the exact configuration parameter word required by that engine. This command is primarily utilized within encrypted high-assurance secure boot deployment pipelines.

Copyright © 2026 Guangzhou eSmart Information Technology Co., Ltd. All Rights Reserved.
All content in this book is copyrighted by the author. For personal learning and exchange only. Commercial use without authorization is strictly prohibited. Email:

✉ 3348194517@qq.com | hai616878@gmail.com